package leetcode.editor.cn.q1xx

class Q119 {
    fun getRow(rowIndex: Int): List<Int> {
        val result = arrayListOf(1)
        for (i in 0 until rowIndex) {
            result.add(1)
            for (j in (1 until result.size - 1).reversed()) {
                result[j] = result[j]+ result[j-1]
            }
        }
        return result
    }
}